<?php
	/**
	 * @ignore
	 */
	if( defined("apl_".__FILE__)) return;
	define("apl_".__FILE__,"apl_".__FILE__);
	
	/**
	 * Basic HTML Tag Object
	 *
	 * @package apl
	 * @subpackage html
	 */
	abstract class AplHtmlTag
	{
		private $Name;
		public 	$ElementName;
		public 	$Id;
		public 	$Text;
		public 	$Width;
		public 	$Style;
		public 	$Class;
		public 	$Align;
		public 	$CustomLine;
		
		function  __construct($paramName = null)
		{
			$this->Name = $paramName;
		}
	 	/**
	  	*	Creates  tag
	  	*	@return String
	  	*/
		abstract function buildTag();
	
		protected function tagEnd()
		{
			return "</".$this->Name.">";
		}
	
		protected function tagStart()
		{
			$tag = "<".$this->Name;
			if( isset( $this->Width ) )
				$tag=$tag." Width=".$this->Width." ";
            if( isset( $this->Id ) )
                $tag=$tag." id='".$this->Id."' ";
			if( isset( $this->ElementName ) )
				$tag=$tag." name='".$this->ElementName."' ";
			if( isset($this->Class) )
				$tag = $tag." Class='".$this->Class."' ";
			if( isset($this->Style) )
				$tag = $tag . " Style='".$this->Style."' ";
			if( isset($this->Align) )
				$tag = $tag . " Align='".$this->Align."' ";
			if( isset($this->CustomLine) )
				$tag = $tag . " ".$this->CustomLine." ";
			$tag = $tag.">";
			return $tag;
	
		}
	}
?>